#ifndef QTMLIBCSV_H
#define QTMLIBCSV_H

#include <QObject>
#include <QSize>
#include <QFile>
#include <QDebug>

class QTmLibCSV : public QObject
{
    Q_OBJECT
public:
    explicit QTmLibCSV(QObject *parent = 0);
    bool loadFile(QString strFilePath); // 加载并读取
    QString getTextAt(int i, int j, bool* bSuccess=NULL);
    QStringList getTextRow(int i, bool* bSuccess=NULL);
    QStringList getTextColum(int j, bool* bSuccess=NULL);
    QSize getContentSize();
    QList<QStringList> getDataList();
private:
    QString pr_strFilePath;
    QList<QStringList> pr_listContent;
    QSize pr_maxSize;
    void _processList(char** pBuff, int nSize);
};

#endif // QTMLIBCSV_H
